package com.qupeng.demo.kafka.kafkaspringbootstreams.dashboard.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class AgentStatistic implements Serializable {
    private String agentId;
    private String agentName;
    private Set<String> caseHandled = new HashSet<>();
    private Set<String> caseHandling = new HashSet<>();
    private String status;
    private Integer statusDuration = 0;
    private Integer configuredCapacity = 0;

    @Override
    public String toString() {
        return "AgentStatistic{" +
                "agentId='" + agentId + '\'' +
                ", agentName='" + agentName + '\'' +
                ", caseHandled=" + caseHandled.size() +
                ", caseHandling=" + caseHandling.size() +
                ", status='" + status + '\'' +
                ", statusDuration=" + statusDuration +
                ", capacity=" + caseHandling.size() + " / " + configuredCapacity +
                '}';
    }
}
